<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>打印订单</title>
{insert_scripts files="../js/jquery.js"}
<style   media=print>   
.Noprint{display:none;}   
.PageNext{page-break-after: always;}   
</style>   
<style type="text/css">
    body,td ,h5, h6, h4{ font-size:16px; font-family: '微软雅黑';margin: 0;padding: 0;font-weight: inherit;}
    .border{border:1px solid #000;}
    .border2{border-bottom:1px solid #000;height: 51px;}
    h5{width: 100%;height: 30px;line-height: 30px;float: left;text-align: center;border: 1px solid #000;}
    h6{width: 100%;height: 51px;line-height: 25px;float: left;text-align: center;border-top: 1px solid #000;border-bottom: 1px solid #000;margin-top: -1px;}
    h4{width: 100%;height: 51px;line-height: 51px;float: left;text-align: center;}
    h5 span{height: 30px;overflow: hidden}
    h6 span{height: 51px;overflow: hidden;}
    .l1{width: 230px;padding-right: 20px;float: left;}
    .l2{width: 100px;float: left;}
    .l3{width: 50px;float: left;}
    .l4{width: 100px;float: left;}
    .l5{width: 100px;float: left;}
    .l6{width: 100px;float: left;}
    .l7{width: 100px;float: left;}
    .p1 .l1{width: 320px;}
    .p1 .l3{width: 100px;}
    .p2 .l3{width: 100px;font-size: 20px;}
    .p2 .l2{width: 130px;}
    .p2 .l5{width: 150px;}
    .p2 .l3,.p2 .l5,.p2 .l4,.p2 .l6{font-weight: bold;font-size: 20px;}

    .red{color: #ab0409;}
    .blod{font-weight: bold;}
</style>
</head>
<body style="padding: 20px;margin: 0px;width: 800px;">
    <script type="text/javascript">
        $(function(){
            var num = 1070;
            var html = ' <hr align="center" width="100%" size="1" noshade class="NOPRINT"><div class="PageNext"></div><h4></h4>';
            $.each($('.p1'),function(k,v){
                var top = $(this).offset().top;
                if(top%num<51){
                    num +=10;
                    if(num >= 1120) num = 1120;
                    $(this).after(html);
                }
            });
        });
    </script>
<h2 align="center" style="float: left;width: 100%;line-height: 50px;font-weight: inherit;"><img src="images/logo.jpg" style='vertical-align:middle;margin-right:3px;float: left;margin-left: 20px;' height="50"/>{if $order.area_name}<img src="images/daodankuaidi.png" style='vertical-align:middle;margin-right:3px;float: left;margin-left: 20px;' height="50"/>{/if}订货确认单<img src="barcodegen/test_1D.php?text={$order.order_sn}" style='vertical-align:middle;margin-right:3px;float: right' height="50" width="200"/></h2>

<table id="print_1" width="100%" cellpadding="1">
    <tr>
        <td >收货人：{$order.consignee}</td>
    </tr>
    <tr>
        <td align="left">
            下订单时间：{$order.add_time}　　支付方式：{$order.pay_name}
        </td>
    </tr>
    <tr>
        <td align="left">
            {if $order.tel}联系电话：{$order.tel}　　{/if}<!-- 联系电话 -->
            {if $order.mobile}手机号码：{$order.mobile}　　{/if}<!-- 手机号码 -->
            收货人地址：[{$order.region}]　<span class="red">{$order.area_name}</span>　{$order.address}　<!-- 收货人地址 -->
        </td>
    </tr>
</table>
    <h6 style="line-height: 30px;margin: 10px 0 0 0px;height: 30px;border: none;text-align:left;">订单号：{$order.order_sn}[{$order.consignee}]</h6>
    <h5 class="p1">
        <span class="l1">商品名称</span>
        <span class="l2">属性</span>
        <span class="l3">数量</span>
        <span class="l6">单价</span>
        <span class="l7">小计</span>
    </h5>
    {foreach from=$goods_lists item=goods key=key}
    <h6 class="p1">
        <span class="l1" align="left">{$goods.goods_name}{if $goods.is_gift}{if $goods.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}{if $goods.parent_id gt 0}{$lang.remark_fittings}{/if}</span>
        <span class="l2">{if $goods.goods_attr AND !$goods.compose_goods}{$goods.goods_attr} {/if}</span>
        <span class="l3 blod" style="font-size: 18px;" align="center">{$goods.goods_number}</span>
        <span class="l6">{$goods.formated_goods_price}</span>
        <span class="l7">{$goods.formated_subtotal}</span>
    </h6>
        {foreach from=$goods.compose_goods item=item}
        <h6 class="p1">
            <span class="l1" align="left"><span class="red">（套）</span>{$item.goods_name}{if $item.is_gift}{if $item.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}{if $item.parent_id gt 0}{$lang.remark_fittings}{/if}</span>
            <span class="l2">{if $item.attr_name}{$item.attr_name} {/if}</span>
            <span class="l3 blod">{$item.goods_number}</span>
            <span class="l6">{$item.formated_goods_price}</span>
            <span class="l7">{$item.formated_subtotal}</span>
        </h6>
        {/foreach}
    {/foreach}
    <h6 style="border:none;" class="p1">
        <div align="right">数量总计：{$goods_number_amount}　　
        商品总价：<strong>{$order.formated_goods_amounts}</strong>
        + 邮费：<strong>{$order.formated_shipping_fees}</strong>
        </div>
        <div align="right"> = 订单总金额：<strong>{$order.formated_total_fees}</strong>
        </div>
    </h6>
    <hr align="center" width="100%" size="1" noshade class="NOPRINT"><div class="PageNext"></div><h4></h4>



    <script type="text/javascript">
        $(function(){
            var num = 1070;
            var html = ' <hr align="center" width="100%" size="1" noshade class="NOPRINT"><div class="PageNext"></div><h4></h4>';
            var t2_top = $('.t2').offset().top;
            $.each($('.p2'),function(k,v){
                var top = $(this).offset().top-t2_top;
                if(top%num<51){
                    num +=10;
                    if(num >= 1120) num = 1120;
                    $(this).after(html);
                }
            });
        });
    </script>

<table width="100%" cellpadding="1" class="t2">
    <tr>
        <td >收货人：{$order.consignee}<img src="barcodegen/test_1D.php?text={$order.order_sn}" style='vertical-align:middle;margin-right:3px;float: right' height="50" width="200"/>{if $order.area_name}<img src="images/daodankuaidi.png" style='vertical-align:middle;margin-right:3px;float: left;margin-left: 20px;' height="50"/>{/if}</td>
    </tr>
    <tr>
        <td align="left">
            下订单时间：{$order.add_time}　　支付方式：{$order.pay_name}
        </td>
    </tr>
    <tr>
        <td align="left">
            {if $order.tel}联系电话：{$order.tel}　　{/if}<!-- 联系电话 -->
            {if $order.mobile}手机号码：{$order.mobile}　　{/if}<!-- 手机号码 -->
            收货人地址：[{$order.region}]　<span class="red">{$order.area_name}</span>　{$order.address}　<!-- 收货人地址 -->
        </td>
    </tr>
</table>
    <h6 style="line-height: 30px;margin: 10px 0 0 0px;height: 30px;border: none;text-align:left;">订单号：{$order.order_sn}[{$order.consignee}]</h6>
    <h5 class="p2">
        <span class="l5">货号</span>
        <span class="l1">商品名称</span>
        <span class="l2">属性</span>
        <span class="l3">数量</span>
        <span class="l4">编号</span>
    </h5>
    {if $guadanle}
    <h6 class="p2">
        <span class="l5">{$guadanle.goods_sku}</span>
        <span class="l1" align="left">{$guadanle.goods_name}</span>
        <span class="l2"></span>
        <span class="l3 blod"></span>
        <span class="l4">{$guadanle.goods_sku}</span>
    </h6>
    {/if}
    {foreach from=$goods_lists item=goods key=key}
    <h6 class="p2">
        <span class="l5">{$goods.bubble_sort}</span>
            <span class="l1" align="left"><span class="red">（套）</span>{$item.goods_name}{if $item.is_gift}{if $item.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}{if $item.parent_id gt 0}{$lang.remark_fittings}{/if}</span>
        <span class="l2">{if $goods.goods_attr AND !$goods.compose_goods}{$goods.goods_attr} {/if}</span>
        <span class="l3 blod" style="font-size: 18px;" align="{if $goods.goods_number gt 1}center{else}left{/if}">{$goods.goods_number}</span>
        <span class="l4">{if $goods.goods_attr_sku gt 0}{$goods.goods_attr_sku}{else}{$goods.goods_sku}{/if}</span>
    </h6>
        {foreach from=$goods.compose_goods item=item }
        <h6 class="p2">
            <span class="l5">{$item.bubble_sort}</span>
            <span class="l1" align="left"><span class="red">（套）</span>{$item.goods_name}{if $item.is_gift}{if $item.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if}{if $item.parent_id gt 0}{$lang.remark_fittings}{/if}</span>
            <span class="l2">{if $item.attr_name}{$item.attr_name} {/if}</span>
            <span class="l3 blod" align="{if $item.goods_number gt 1}center{else}left{/if}">{$item.goods_number}</span>
            <span class="l4">{if $item.goods_attr_sku gt 0}{$item.goods_attr_sku}{else}{$item.goods_sku}{/if}</span>
        </h6>
        {/foreach}
        {if $goods.compose_goods}
        <h6 class="p2">
            <span class="l5"></span>
            <span class="l1"></span>
            <span class="l2"></span>
            <span class="l3"></span>
            <span class="l4"></span>
        </h6>
        {/if}
    {/foreach}

    <h6 style="border:none;text-align: left;" class="p2">
        <span><br/>
            配货员：　　　　　　　珍珠棉：　　　　　　　纸皮箱：　　　　　　　　　总数量：{$goods_number_amount}<br/><br/>
            气泡袋：　　　　　　　透明胶：　　　　　　　数量核对：　
        </span>
    </h6>
    <h6 style="border:none;" class="p2">
        <br/>
        <div align="right">商品总价：<strong>{$order.formated_goods_amounts}</strong>
        + 邮费：<strong>{$order.formated_shipping_fees}</strong>
        </div>
        <div align="right"> = 订单总金额：<strong>{$order.formated_total_fees}</strong>
        </div>
    </h6>
</body>
</html>
